// import './assets/main.css'

import { createApp } from 'vue'
//状态管理
import { createPinia } from 'pinia'
//状态持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
//创建pinia实例
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

import App from './App.vue'
//路由导入
import router from './router'

//bootstrap样式引入 css/scss
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/scss/bootstrap.scss'
//bootstrap图标样式引入
import 'bootstrap-icons/font/bootstrap-icons.min.css'

//elementplus的引入会覆盖bootstrap样式引入
// import ElementPlus from 'element-plus' //全局引入
import 'element-plus/dist/index.css'

//scss 变量的全局导入
import './style/variables.module.css'
//scss 样式导入
import './style/index.css'

// view UI 的引入
// import ViewUIPlus from 'view-ui-plus'
//view UI 样式引入
// import 'view-ui-plus/dist/styles/viewuiplus.css'

//echars全局导入
//引入echarts
import 'echarts'
//引入vue-echarts
import ECharts from 'vue-echarts'
//局部注册使用
import { use } from "echarts/core";
// console.log(ECharts)

//three的应用
import * as THREE from "three";  //导入threeJs

const app = createApp(App)

app.use(pinia)
app.use(router)
//全局引入ElementPlus
// app.use(ElementPlus)
//ViewUIPlus,进行全局配置
// app.use(ViewUIPlus,{})

//注册为全局组件
//使用的时候用<v-chart></v-chart>
app.component('v-chart', ECharts)
//挂载到原型
app.config.globalProperties.$THREE = THREE;
app.mount('#app')

console.log(app)